import FirstStore from '../../../store/firstStore'

export const optionConfig = (dataX, dataY1, dataY2, dataY3, dataY4, dataY5) => {
    return {
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                lineStyle: {
                    color: {
                        type: 'linear',
                        x: 0,
                        y: 0,
                        x2: 0,
                        y2: 1,
                        colorStops: [{
                            offset: 0,
                            color: 'rgba(0, 255, 233,0)'
                        }, {
                            offset: 0.5,
                            color: 'rgba(255, 255, 255,1)',
                        }, {
                            offset: 1,
                            color: 'rgba(0, 255, 233,0)'
                        }],
                        global: false
                    }
                },
            },
        },
        grid: {
            top: '15%',
            left: '10%',
            right: '5%',
            bottom: '20',
            // containLabel: true
        },
        xAxis: [{
            type: 'category',
            axisLine: {
                show: false
            },
            splitArea: {
                // show: true,
                color: '#f00',
                lineStyle: {
                    color: '#f00'
                },
            },
            axisLabel: {
                color: '#fff'
            },
            splitLine: {
                show: false
            },
            axisTick: {
                show: false,
            },
            boundaryGap: false,
            data: FirstStore.countOrderFiveX
        }],
        yAxis: [{
            // name: '单位/个',
            // nameTextStyle: {
            //     color: '#FFF',
            //     fontSize: 10,
            //     marginTop:20,
            //     paddingTop:20
            // },
            type: 'value',
            // splitNumber: 6,
            splitLine: {
                show: true,
                lineStyle: {
                    color: 'rgba(255,255,255,0.1)'
                }
            },
            axisLine: {
                show: false,
            },
            axisLabel: {
                show: true,
                margin: 14,
                formatter: '{value}',
                // formatter: function (value,index) {
                //     console.log(value,index)
                // },
                textStyle: {
                    color: '#d1e6eb',

                },
            },
            axisTick: {
                show: false,
            },
        }],
        series: [{
            name: '',
            type: 'line',
            // smooth: true, //是否平滑
            showAllSymbol: true,
            // symbol: 'image://./static/images/guang-circle.png',
            symbol: 'circle',
            symbolSize: 10,
            lineStyle: {
                normal: {
                    color: "#36FF9C",
                    shadowColor: 'rgba(0, 0, 0, .3)',
                    shadowBlur: 0,
                    shadowOffsetY: 1,
                    shadowOffsetX: 1,
                },
            },
            label: {
                show: true,
                position: 'top',
                textStyle: {
                    color: '#36FF9C',
                }
            },
            itemStyle: {
                color: "#36FF9C",
                borderColor: "#fff",
                borderWidth: 0,
                shadowColor: 'rgba(0, 0, 0, .3)',
                shadowBlur: 0,
                shadowOffsetY: 2,
                shadowOffsetX: 2,
            },
            tooltip: {
                show: false
            },
            data: FirstStore.countOrderFiveCMY
        },
            {
                name: '',
                type: 'line',
                // smooth: true, //是否平滑
                showAllSymbol: true,
                // symbol: 'image://./static/images/guang-circle.png',
                symbol: 'circle',
                symbolSize: 10,
                lineStyle: {
                    normal: {
                        color: "#FFFF00",
                        // shadowColor: 'rgba(0, 0, 0, .3)',
                        // shadowBlur: 0,
                        // shadowOffsetY: 5,
                        // shadowOffsetX: 5,
                    },
                },
                label: {
                    show: true,
                    position: 'top',
                    textStyle: {
                        color: '#FFFF00',
                    }
                },

                itemStyle: {
                    color: "#FFFF00",
                    borderColor: "#fff",
                    borderWidth: 0,
                    shadowColor: 'rgba(0, 0, 0, .3)',
                    shadowBlur: 0,
                    shadowOffsetY: 2,
                    shadowOffsetX: 2,
                },
                tooltip: {
                    show: false
                },
                data: FirstStore.countOrderFivePMY
            },{
                name: '',
                type: 'line',
                // smooth: true, //是否平滑
                showAllSymbol: true,
                // symbol: 'image://./static/images/guang-circle.png',
                symbol: 'circle',
                symbolSize: 10,
                lineStyle: {
                    normal: {
                        color: "#42F3FF",
                        // shadowColor: 'rgba(0, 0, 0, .3)',
                        // shadowBlur: 0,
                        // shadowOffsetY: 5,
                        // shadowOffsetX: 5,
                    },
                },
                label: {
                    show: true,
                    position: 'top',
                    textStyle: {
                        color: '#42F3FF',
                    }
                },

                itemStyle: {
                    color: "#42F3FF",
                    borderColor: "#fff",
                    borderWidth: 0,
                    shadowColor: 'rgba(0, 0, 0, .3)',
                    shadowBlur: 0,
                    shadowOffsetY: 2,
                    shadowOffsetX: 2,
                },
                tooltip: {
                    show: false
                },
                data: FirstStore.countOrderFiveCVY
            },{
                name: '',
                type: 'line',
                // smooth: true, //是否平滑
                showAllSymbol: true,
                // symbol: 'image://./static/images/guang-circle.png',
                symbol: 'circle',
                symbolSize: 10,
                lineStyle: {
                    normal: {
                        color: "#FF2878",
                        // shadowColor: 'rgba(0, 0, 0, .3)',
                        // shadowBlur: 0,
                        // shadowOffsetY: 5,
                        // shadowOffsetX: 5,
                    },
                },
                label: {
                    show: true,
                    position: 'top',
                    textStyle: {
                        color: '#FF2878',
                    }
                },

                itemStyle: {
                    color: "#FF2878",
                    borderColor: "#fff",
                    borderWidth: 0,
                    shadowColor: 'rgba(0, 0, 0, .3)',
                    shadowBlur: 0,
                    shadowOffsetY: 2,
                    shadowOffsetX: 2,
                },
                tooltip: {
                    show: false
                },
                data: FirstStore.countOrderFiveIIY
            },{
                name: '',
                type: 'line',
                // smooth: true, //是否平滑
                showAllSymbol: true,
                // symbol: 'image://./static/images/guang-circle.png',
                symbol: 'circle',
                symbolSize: 10,
                lineStyle: {
                    normal: {
                        color: "#EA6E28",
                        // shadowColor: 'rgba(0, 0, 0, .3)',
                        // shadowBlur: 0,
                        // shadowOffsetY: 5,
                        // shadowOffsetX: 5,
                    },
                },
                label: {
                    show: true,
                    position: 'top',
                    textStyle: {
                        color: '#EA6E28',
                    }
                },

                itemStyle: {
                    color: "#EA6E28",
                    borderColor: "#fff",
                    borderWidth: 0,
                    shadowColor: 'rgba(0, 0, 0, .3)',
                    shadowBlur: 0,
                    shadowOffsetY: 2,
                    shadowOffsetX: 2,
                },
                tooltip: {
                    show: false
                },
                data: FirstStore.countOrderFiveCSY
            }
        ]
    };
}
